//
//  CommonUtil.h
//  Kjs-iOS
//
//  Created by 江伟 on 16/7/23.
//  Copyright © 2016年 jmhz. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "ItemInfo.h"
#define bankLogoImageArray @[@"bankcard-nongye",@"bankcard-gongshang",@"bankcard-jianshe",@"bankcard-minsheng",@"bankcard-xingye",@"bankcard-jiaotong",@"bankcard-zhongxin",@"bankcard-pingan",@"bankcard-guangfa",@"bankcard-zheshang",@"bankcard-zhongguo",@"bankcard-pufa",@"bankcard-haixia",@"bankcard-guangda",@"bankcard-hengfeng",@"bankcard-huaxia",@"bankcard-huifeng",@"bankcard-pufa",@"bankcard-quanzhou",@"bankcard-xiamen",@"bankcard-xiamenguoji",@"bankcard-shanghai",@"bankcard-hengsheng",@"bankcard-youzheng",@"bankcard-zhaoshang"]

#define bankBigLogoImageArray @[@"bankcard-big-nongye",@"bankcard-big-gongshang",@"bankcard-big-jianshe",@"bankcard-big-minsheng",@"bankcard-big-xingye",@"bankcard-big-jiaotong",@"bankcard-big-zhongxin",@"bankcard-big-pingan",@"bankcard-big-guangfa",@"bankcard-big-zheshang",@"bankcard-big-zhongguo",@"bankcard-big-pufa",@"bankcard-big-haixia",@"bankcard-big-guangda",@"bankcard-big-hengfeng",@"bankcard-big-huaxia",@"bankcard-big-huifeng",@"bankcard-big-pufa",@"bankcard-big-quanzhou",@"bankcard-big-xiamen",@"bankcard-big-xiamenguoji",@"bankcard-big-shanghai",@"bankcard-big-hengsheng",@"bankcard-big-youzheng",@"bankcard-big-zhaoshang"]

#define bankNameArray @[@"农业银行",@"工商银行",@"建设银行",@"民生银行",@"兴业银行",@"交通银行",@"中信银行",@"平安银行",@"广发银行",@"招商银行",@"中国银行",@"浦发银行",@"福建海峡银行",@"光大银行",@"恒丰银行",@"华夏银行",@"汇丰银行",@"泉州银行",@"厦门银行",@"厦门国际银行",@"上海银行",@"香港恒生银行",@"邮政银行",@"浙商银行"]

typedef NS_ENUM(NSInteger,BankCardType) {
    nongye = 0,
    gongshang,
    jianshe ,  //建设银行
    minsheng,
    xingye,   //兴业银行
    jiaotong,
    zhongxin,   //中信银行
    pingan,
    guangfa,
    zheshang,
    zhongguo,
    pufa,
    haixia,
    guangda,
    hengfeng,
    huaxia,
    huifeng,
    quanzhou,
    xiamen,
    xiamenguoji,
    shanghai,
    hengsheng,
    youzheng,
    zhaoshang,
    
};

typedef NS_ENUM(NSInteger,BankCardBGColor) {
    red = 0,
    blue
};


@interface CommonUtil : NSObject

+ (NSString *)getItemStatusStrWithStatus:(int)itemStatus;

+ (NSString *)getGdBenefitModeStrWithMode:(int)gdBenefitMode;

+ (NSString *)getGdBenefitModeStrWithStrMode:(NSString *)gdBenefitMode;

+ (NSString *)getOrderStatusStrWithMode:(NSString *)orderStatus;

+ (NSString *)getLogTypeNameWithTpye:(NSString *)type;

+ (NSString *)getOrderPayModeNameWithMode:(NSString *)mode;

+ (NSInteger)getColorByBankType:(NSInteger)type;

+ (BOOL) validateEmail:(NSString *)email;

+ (BOOL) validatePassword:(NSString *)passWord;

+ (BOOL)validateMobile:(NSString *) mobile;

+ (BOOL)validateName:(NSString *) name;
    
+ (BOOL) validateIdentityCard:(NSString *)identityCard;

+ (BOOL) validateTradePsw:(NSString *)tradePsw;

//去掉小数点后多余的0
+ (NSString *)subZeorFrom:(NSString *)number;

@end
